package top.longmarch.flow.test;

import cn.hutool.json.JSONObject;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeBooleanComponent;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@LiteflowComponent(id = "BCmp", name = "BCmp")
public class BCmp extends NodeBooleanComponent {

    @Override
    public boolean processBoolean() throws Exception {
        log.info("BCmp executed!");
        JSONObject context = this.getContextBean(JSONObject.class);
        Integer x = context.getInt("x");
        Integer y = context.getInt("y");
        return x > y;
    }

}
